package com.alibaba.cloud.ddd.interfaces.booking.facade.dto;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

/**
 * DTO for presenting and selecting an itinerary from a collection of
 * candidates.
 */
public final class RouteCandidateDTO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1000039648919611367L;
	private final List<LegDTO> legs;

	/**
	 * Constructor.
	 *
	 * @param legs The legs for this itinerary.
	 */
	public RouteCandidateDTO(final List<LegDTO> legs) {
		this.legs = legs;
	}

	/**
	 * @return An unmodifiable list DTOs.
	 */
	public List<LegDTO> getLegs() {
		return Collections.unmodifiableList(legs);
	}
}